<?php
/**
 * 申请团长模块
 * wf
 * 2022/7/16
 */
namespace App\Http\Controllers\api;

use App\Http\Controllers\Controller;
use App\Models\StoreHead;
use App\Repository\RepositoryInterface\HeadInterface;
use App\Repository\RepositoryInterface\HeadsInterface;
use Illuminate\Http\Request;

class HeadController extends Controller
{
    protected $head;

    public function __construct(HeadsInterface $heads){
        $this->head = $heads;
    }
    /**
     * 团长申请接口
     * @param Request $request
     * @return array
     */
    public function applyHead(Request $request){
        $params = $request->all();
        return $this->head->applyHead($params);
    }

    /**
     * 团长列表接口
     * @param Request $request
     * @return array
     */
    public function headList(Request $request){
        $params = $request->all();
        return  $this->head->headList($params);
    }

    /**
     * 审核状态列表接口
     * @param Request $request
     * @return array
     */
    public function headStatus(Request $request){
        $status = $request->input('status');
        return  $this->head->headStatus($status);
    }

    /**
     * 通过/不通过接口
     * @param Request $request
     * @return array
     */
    public function adopt(Request $request){
        $params = $request->all();
        return  $this->head->headList($params);
    }

}
